package com.group01.community.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 报修信息
 * </p>
 *
 * @author guoyuan
 * @since 2025-05-01
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class ZyRepair extends Model<ZyRepair> {

    private static final long serialVersionUID=1L;

    /**
     * 报修ID
     */
    @TableId(value = "repair_id", type = IdType.AUTO)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long repairId;

    /**
     * 报修编号
     */
    private String repairNum;

    /**
     * 报修状态
     */
    private String repairState;

    /**
     * 派单时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime assignmentTime;

    /**
     * 接单时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime receivingOrdersTime;

    /**
     * 处理完成时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime completeTime;

    /**
     * 取消时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime cancelTime;

    /**
     * 期待上门时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime doorTime;

    /**
     * 分派人id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long assignmentId;

    /**
     * 处理人id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long completeId;

    /**
     * 处理人电话
     */
    private String completePhone;

    /**
     * 处理人姓名
     */
    private String completeName;

    /**
     * 备注
     */
    private String remark;

    /**
     * 创建者
     */
    private String createBy;

    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    /**
     * 更新者
     */
    private String updateBy;

    /**
     * 更新时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    /**
     * 创建人id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long userId;

    /**
     * 删除状态0默认1删除
     */
    private Integer delFlag;

    /**
     * 报修内容
     */
    private String repairContent;

    /**
     * 小区ID
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long communityId;

    /**
     * 详细地址
     */
    private String address;

    @ApiModelProperty(value = "业主ID")
    private Long ownerId;

    private String otherPhone;

    @TableField(exist = false)
    private Long current = 1L;
    @TableField(exist = false)
    private Long size = 10L;


    @Override
    public Serializable pkVal() {
        return this.repairId;
    }

}
